Skip to content

Parse step and partLimit on server itemMergeOptionBase slots - #99

Merged
Zintixx merged 2 commits into
masterfrom
merge-option-step
Nov 24, 2026
Merged

Zintixx merged 2 commits into
masterfrom
merge-option-step

Conversation

@Zintixx

@Zintixx Zintixx commented Nov 24, 2026 •

Copy link
Copy Markdown

The client merge table nests each slot under <mergeStep step="N"> and the client loads every step it finds, keyed by crystal id, step and part. The server file, table/Server/itemMergeOptionBase.xml, has no such level, so there was no way for server data to say which step a crystal rolls. This adds an optional step attribute on <slot>, plus the partLimit attribute some rows already carry and the type was dropping.

  • Xml/Table/Server/ItemMergeOption.cs: Slot.step, default 1. Every shipped row omits it and is step 1, so existing data parses as before. Slot.partLimit is an M2dArray of ints. The 370300xx/370400xx rows list their slots there (partLimit="13,14,15,16,17") instead of in part.
  • ServerTableParserTest.TestItemMergeOption: it used to only enumerate. It now checks that row 37030001 reads partLimit as 13, 14, 15, 16, 17, as the XML states. It does not pin every row to step 1, since edited archives may give a slot a higher step.
  • Version: 2.4.40.

The consumer is MS2Community/PrivateMaple2#2507, the emulator's empowerment code, which needs the step to write a roll into Empowerment2..5 instead of always Empowerment1.

Verification

  • dotnet test Maple2.File.Tests --filter "FullyQualifiedName~MergeOption" against local archives: TestItemMergeOption and TestItemMergeOptionParser pass. TestItemMergeOptionParserNew fails on an existing row-count assertion (expects 42 rows in the client itemmergeoptionbase.xml, the local archive has 251). It reads the client table, which this change does not touch.
  • dotnet format whitespace --verify-no-changes is clean on the touched files.
  • dotnet pack -p:PackageVersion=2.4.40-debug.0 was restored into an emulator worktree with Maple2.File.Ingest pointed at it, and the ingest mapper and the server test project built against it.

🤖 Generated with Claude Code


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

The client table nests slots under <mergeStep step="N">, but the server file
has no such level, so a slot now names its step in a step attribute (default
1, which is what every retail row is). partLimit was already present on the
370300xx/370400xx rows and was dropped by the type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9fda7ca8-0810-4f4f-a632-a7ba71c2d683
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Edited archives may give a slot a higher step, so the shipped data being all
step 1 is not something the parser test should pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Zintixx
Zintixx merged commit 9211aea into master Nov 24, 2026
3 checks passed
@Zintixx
Zintixx deleted the merge-option-step branch November 24, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant